gpNamespace.NextPlayerTilesLayer = gpNamespace.ParentTilesLayer.extend({
    tileSpace: 18,
    fromPoint: cc.p(1150, cc.winSize.height / 2 + 70),

    warnPoint: cc.p(1099, 475),
    isWarn:false,

    initPosition: function () {
        this.startPoint = cc.p(970, 570);
        this.startPointAp = cc.p(1105, cc.winSize.height-158);
        this.headPoint = cc.p(1206, 527);
        this.headArmaturePoint = cc.p(1185, 860);
        this.chuPointStart = cc.p(1030, 500);
        this.animationPosition = cc.p(900, 500);
        this.preparePosition = cc.p(-46, 120);
//        cc.spriteFrameCache.addSpriteFrames(gpNamespace.gameRes.Game_plist);
        cc.spriteFrameCache.addSpriteFrames(gpNamespace.pdkgamesenceRes.Pdkgamesence_plist);
//        //获取父的Layer，删除所有的子节点
//        var totalButtonLayer = myTilesLayer.getChildByName("spriteRemoved");
//        totalButtonLayer.removeAllChildren();
        
        //不出标签
//        var nochuLabel = new cc.Sprite(gpNamespace.game.Game_noplayTitle);
//        nochuLabel.attr({
//        	x: 641,
//        	y: 268,
//        	anchorX: 0.5,
//        	anchorY: 0.5
//        });
//        this.tishiLayer.addChild(nochuLabel);
//        nochuLabel.setVisible(false);
//        this.nochuLabel = nochuLabel;
//
//        var nochuLabel = this.nochuLabel;
//        nochuLabel.setVisible(true);
//        nochuLabel.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
//        	nochuLabel.setVisible(false);
//        })));
    },

    drawRobot: function () {
        cc.log("托管");
        
//        var trustArmature = this.getChildByTag(this.trustArmatureTag);
//        if (trustArmature != null) {
//            trustArmature.removeFromParent(true);
//        }
          var tuoguanphoto = new cc.Sprite(gpNamespace.pdkgame.Game_tuogaunzhong);
          tuoguanphoto.attr({
        	x: 1120,
        	y: 535,
        	anchorX: 0,
        	anchorY: 0
          });
          this.addChild(tuoguanphoto, 5, "tuoguanLayer");
//        trustArmature = new ccs.Armature("robit_01a");
//        trustArmature.getAnimation().play("s_robit_02a");
//        trustArmature.getAnimation().setSpeedScale(1);
//        trustArmature.setScale(1);
//        trustArmature.setAnchorPoint(0.5, 0.5);
//        trustArmature.setPosition(1208, 645);
//        this.addChild(trustArmature, 1001, this.trustArmatureTag);
//
//        trustArmature.schedule(function () {
//            trustArmature.getAnimation().play("s_robit_02a");
//        }, 3);
    },

    runChuActionOnline: function (tiles) {
        this._super(tiles);

        this.reloadRemains(tiles.length);

        if (this.player.isShowCards) {
            var myTiles = this.player.handTiles;

            for (var i = 0; i < tiles.length; i++) {
                var tile = tiles[i];
                var index = gpNamespace.CardActions.getTileIndex(tile, myTiles);
                if (index >= 0) {
                    this.player.splice(index, 1);
                }
            }

            this.startPoint.x += tiles.length * this.tileSpace;

            this.resetTilesPositionNormal();
        }
    },

    setCurrentChuPosition: function (length) {
        this.currentChuPosition = cc.p(this.chuPointStart.x, this.chuPointStart.y);
        this.currentChuPosition.x = this.chuPointStart.x - 30 * length;
    },

    setScoreLayerPosition: function (scoreLayer) {
        scoreLayer.setPosition(this.headPoint.x - 180, this.headPoint.y);
    },

	reloadTiles: function (tiles) {
		var addpx = 3 / 2 * this.tileSpace;
		cc.log("++++++++++addpx:" + addpx + ",startPoint:" + this.startPoint.x);
		this.startPoint.x -= addpx;
		cc.log("++++++++++startPoint:" + this.startPoint.x);
	
	    this.resetTilesPositionNormal();
	   
	    this._super(tiles);
	}
});